package com.yuwenchao.superafflatus.controller;


import com.yuwenchao.superafflatus.pojo.entity.SuperMusic;
import com.yuwenchao.superafflatus.service.SuperMusicService;
import com.yuwenchao.superafflatus.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ChaooGG
 * @since 2022-01-22
 */
@RestController
@RequestMapping("/superMusic")
@Api(tags = "腾讯云OSS音乐文件列表")
public class SuperMusicController {

    @Autowired
    SuperMusicService superMusicService;

    @ApiOperation(value = "获取所有music信息列表")
    @GetMapping("getMusicList")
    public R getMusicList(){
        List<SuperMusic> musicList = superMusicService.list();
        return R.ok().data("musicList",musicList);

    }


}

